import request from "../utils/request.js"

/**
 * 获取合同信息
 * @param {Object} ct_id 合同ID 
 * @returns promise
 */
export function getCtDetail(ct_id) {
  return request.get(`/user/ct/getCtDetail?ct_id=${ct_id}`)
}

/**
 * 获取实名地址
 * @returns promise
 */
export function getAuthUrl() {
  return request.get(`/user/ct/getAuthUrl`)
}

/**
 * 获取签署地址
 * @param {Object} params 
 * @returns promise
 */
export function getSignUrl(params) {
  return request({
    method: 'get',
    url: '/user/ct/getSignUrl',
    params: params
  })
}

/**
 * 获取实名状态
 * @param {Object} params 
 * @returns promise
 */
export function checkAuthStatus() {
  return request({
    method: 'get',
    url: '/user/ct/checkAuthStatus'
  })
}